home *** CD-ROM | disk | FTP | other *** search
-
- package sub_arctic.test;
-
- /* import various pieces of the sub_arctic toolkit that we need */
- import sub_arctic.lib.*;
- import sub_arctic.input.*;
- import sub_arctic.output.*;
- import sub_arctic.constraints.std_function;
- import sub_arctic.constraints.std_constraint_impl;
- import sub_arctic.constraints.std_encoding_consts;
- import sub_arctic.constraints.std_ext_constraint;
- import sub_arctic.constraints.ext_objpart_encoding;
- import sub_arctic.constraints.op2_impl;
- import java.awt.Point;
- import java.util.Vector;
-
- public class ext_test extends debug_interactor_applet
- implements callback_object, std_encoding_consts {
-
- /* initialization of sub_arctic interface when applet starts */
- public void build_ui(base_parent_interactor top)
- {
- int offset_enc = std_function.offset(PARENT.X(), 0).encoding();
- int add_enc = std_function.add(PARENT.X(), PARENT.X(), 0).encoding();
-
- scale s1 = new scale(0,0, 200, 0, 100, 50, 10, this);
- scale s2 = new scale(0,0, 200, 0, 100, 50, 10, this);
-
- button b1 = new button("Test", this);
- b1.set_x_constraint(std_function.offset(OTHER.OBJ(s1).PART_A(), 10));
- b1.set_y_constraint(std_function.offset(OTHER.OBJ(top).Y(), 20));
- top.add_child(b1);
-
- button b2 = new button("Test 2", this);
- b2.set_x_constraint(std_function.add(OTHER.OBJ(b1).X2(),
- OTHER.OBJ(s2).PART_A(), 10));
- b2.set_y_constraint(std_function.offset(OTHER.OBJ(b1).Y(), 0));
- top.add_child(b2);
-
- s1.set_x_constraint(std_function.offset(OTHER.OBJ(top).X(), 10));
- s1.set_y_constraint(std_function.offset(OTHER.OBJ(b2).Y2(), 10));
- top.add_child(s1);
-
- s2.set_x_constraint(std_function.offset(OTHER.OBJ(top).X(), 10));
- s2.set_y_constraint(std_function.offset(OTHER.OBJ(s1).Y2(), 10));
- top.add_child(s2);
-
- }
-
-
- /* handle callback */
- public void callback(interactor from, event evt, int cb_num, Object cb_parm)
- {
- /* ignore */
- }
- };
-
- /*=========================== COPYRIGHT NOTICE ===========================
-
- This file is part of the subArctic user interface toolkit.
-
- Copyright (c) 1996 Scott Hudson and Ian Smith
- All rights reserved.
-
- The subArctic system is freely available for most uses under the terms
- and conditions described in
- http://www.cc.gatech.edu/gvu/ui/sub_arctic/sub_arctic/doc/usage.html
- and appearing in full in the lib/interactor.java source file.
-
- The current release and additional information about this software can be
- found starting at: http://www.cc.gatech.edu/gvu/ui/sub_arctic/
-
- ========================================================================*/
-